package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TestSysPaperMapper;
import com.ruoyi.system.domain.TestSysPaper;
import com.ruoyi.system.service.ITestSysPaperService;

/**
 * 物料管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-18
 */
@Service
public class TestSysPaperServiceImpl implements ITestSysPaperService 
{
    @Autowired
    private TestSysPaperMapper testSysPaperMapper;

    /**
     * 查询物料管理
     * 
     * @param paperId 物料管理主键
     * @return 物料管理
     */
    @Override
    public TestSysPaper selectTestSysPaperByPaperId(Long paperId)
    {
        return testSysPaperMapper.selectTestSysPaperByPaperId(paperId);
    }

    /**
     * 查询物料管理列表
     * 
     * @param testSysPaper 物料管理
     * @return 物料管理
     */
    @Override
    public List<TestSysPaper> selectTestSysPaperList(TestSysPaper testSysPaper)
    {
        return testSysPaperMapper.selectTestSysPaperList(testSysPaper);
    }

    /**
     * 新增物料管理
     * 
     * @param testSysPaper 物料管理
     * @return 结果
     */
    @Override
    public int insertTestSysPaper(TestSysPaper testSysPaper)
    {
        testSysPaper.setCreateTime(DateUtils.getNowDate());
        return testSysPaperMapper.insertTestSysPaper(testSysPaper);
    }

    /**
     * 修改物料管理
     * 
     * @param testSysPaper 物料管理
     * @return 结果
     */
    @Override
    public int updateTestSysPaper(TestSysPaper testSysPaper)
    {
        testSysPaper.setUpdateTime(DateUtils.getNowDate());
        return testSysPaperMapper.updateTestSysPaper(testSysPaper);
    }

    /**
     * 批量删除物料管理
     * 
     * @param paperIds 需要删除的物料管理主键
     * @return 结果
     */
    @Override
    public int deleteTestSysPaperByPaperIds(Long[] paperIds)
    {
        return testSysPaperMapper.deleteTestSysPaperByPaperIds(paperIds);
    }

    /**
     * 删除物料管理信息
     * 
     * @param paperId 物料管理主键
     * @return 结果
     */
    @Override
    public int deleteTestSysPaperByPaperId(Long paperId)
    {
        return testSysPaperMapper.deleteTestSysPaperByPaperId(paperId);
    }
}
